import { CodeGenData } from "@/api-services/models/codeGen/CodeGenData";
import { DbConfig } from "@/api-services/models/codeGen/DbConfig";
import { DbTableInfo } from "@/api-services/models/codeGen/DbTableInfo";
import { BaseApi } from "@/api-services/apis/baseApi";

/**
 * 代码生成基础服务
 */
class CodeGenApi extends BaseApi<CodeGenData> {
  getDbConfig = () => {
    return this.normalGet<DbConfig>(`/dbConfigSelector`, null);
  };
  //数据表选择器
  tableSelector = (data: any) => {
    return this.normalGet<DbTableInfo>(`/tableSelector`, data);
  };
  //获取数据表字段信息
  getTableFields = (data: any) => {
    return this.normalGet<object>(`/getTableFields`, data);
  };
}

export default new CodeGenApi("/codeGen/base");
